<div class="views">
    <div class="view view-main">
        <div class="pages">
            <div data-page="home" class="page navbar-fixed">
                <div class="navbar">
                    <div class="navbar-inner">
                        <div class="left"></div>
                        <div class="center">上机登记</div>
                        <div class="right"></div>
                    </div>
                </div>
                <div class="page-content">
                    <div class="content-block-title">确认信息后提交</div>
                    <div class="list-block">
                        <ul>
                            <li>
                                <div class="item-content">
                                    <div class="item-media"><i class="icon icon-form-tel"></i></div>
                                    <div class="item-inner">
                                        <div class="item-title label">计算机名</div>
                                        <div class="item-input">
                                            <input type="text" disabled name="pcname" id="pcname">
                                            <input type="hidden" name="pccode" id="pccode">
                                        </div>
                                    </div>
                                </div>
                            </li>
                            <li>
                                <div class="item-content">
                                    <div class="item-media"><i class="icon icon-form-name"></i></div>
                                    <div class="item-inner">
                                        <div class="item-title label">姓名</div>
                                        <div class="item-input">
                                            <input type="text" placeholder="此处输入姓名" name="studnet" id="student">
                                        </div>
                                    </div>
                                </div>
                            </li>
                            <li>
                                <div class="item-content">
                                    <div class="item-media"><i class="icon icon-form-email"></i></div>
                                    <div class="item-inner">
                                        <div class="item-title label">班级</div>
                                        <div class="item-input">
                                            <input type="text" disabled name="classname" id="classname">
                                        </div>
                                    </div>
                                </div>
                            </li>
                            <li>
                                <div class="item-content">
                                    <div class="item-media"><i class="icon icon-form-url"></i></div>
                                    <div class="item-inner">
                                        <div class="item-title label">课程内容</div>
                                        <div class="item-input">
                                            <input type="text" disabled name="lesson" id="lesson">
                                        </div>
                                    </div>
                                </div>
                            </li>
                            <li>
                                <div class="item-content">
                                    <div class="item-media"><i class="icon icon-form-url"></i></div>
                                    <div class="item-inner">
                                        <div class="item-title label">教师</div>
                                        <div class="item-input">
                                            <input type="text" disabled name="teacher" id="teacher">
                                        </div>
                                    </div>
                                </div>
                            </li>
                            <li>
                                <div class="item-content">
                                    <div class="item-media"><i class="icon icon-form-calendar"></i></div>
                                    <div class="item-inner">
                                        <div class="item-title label">时段</div>
                                        <div class="item-input">
                                            <input type="text" disabled name="time" id="time">
                                        </div>
                                    </div>
                                </div>
                            </li>
                            <li>
                                <div class="item-content">
                                    <div class="item-inner">
                                        <div class="item-input">
                                            <a href="#" class="button active" id="submitlesson">确定</a>
                                        </div>
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="/socket.io/socket.io.js"></script>
<script src="https://code.jquery.com/jquery-1.11.1.js"></script>
<script>
    $(function () {
        var socket = io();
        socket.on('set lesson', function (res) {
            $("#classname").val(res.classname);
            $("#lesson").val(res.lesson);
            $("#time").val(res.time);
            $("#teacher").val(res.teacher);
            $("#student").val(res.pcinfo[0].StudentName);
            $("#pcname").val(res.pcinfo[0].studentcode)
            $("#pccode").val(res.pcinfo[0].pcname)
        })

        socket.on('reload lesson', function () {
            socket.emit('reload lesson')
        })
    });
</script>